<template>
	<view class="goodsWrap" @click.stop="goDetail(info.goods_id)">
		<u-image width="100%" height="350" :src="info.cover_pic" border-radius="8rpx 8rpx 0 0"></u-image>
		<view class="priceWrap">
			<p class="name"> {{ info.title }}</p>
			<view class="bottom">
				<text class="goodsPrice"><span class="rmb">置换补差价：¥</span>{{ info.displaces_price }}</text>
			</view>
			<p class="yuan">{{info.original_price}}</p>
		</view>

	</view>
</template>

<script>
	export default {
		name: "goodsCard",
		props: {
			info: {
				type: Object,
				default: function() {
					return {}
				}
			}
		},
		methods:{
			goDetail(goods_id){
				this.$emit("goDetail",{goods_id:goods_id})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.goodsWrap {
		box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.13);
		background: #fff;
		border-radius: 12rpx;
		overflow: hidden;
		margin: 8rpx;
		flex-shrink: 0;

		.priceWrap {
			padding: 12rpx;
			.yuan{
				text-decoration:line-through;
			}
			.badeg-self {
				font-size: 10px;
				padding: 4rpx 8rpx;
				border-radius: 100rpx;
				display: inline-block;
				color: #fff;
				background: linear-gradient(180deg, #FCC485 0%, #FF760D 100%);
				line-height: 1;
				margin-right: 8rpx;
			}

			.bottom {
				display: flex;
				align-items: center;
				line-height: 60rpx;
				.moreAction {
					color: #aeb4bb;
					font-weight: 800;
					font-size: 40rpx;
					letter-spacing: -4px;
					margin-right: 14rpx;
				}
			}

			/deep/.goodsPrice {
				font-weight: 600;
				color: #fa3f3f;
				font-size: 34rpx;
				-webkit-font-smoothing: antialiased;
				-moz-osx-font-smoothing: grayscale;
				// font-family: "pangmen";
				.rmb {
					font-weight: 400;
					font-size: 20rpx;
				}
			}
			
			.tag{
				padding: 2rpx 4rpx;
				margin: 5rpx 5rpx 5rpx 0;
			}

			.name {
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				// -webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				line-height: 1.4;
				font-size: 28rpx;
				letter-spacing: 1.75rpx;
				margin: 8rpx 0;
				color: #444;
			}
		}



		.coupon {
			width: 24rpx;
			height: 16rpx;
		}
	}

	.currency {
		color: #666;
		font-size: 24rpx;
		margin-left: 8rpx;
	}
	
	
</style>
